package tests;

import java.util.ArrayList;

import view.View;

import model.Model;
import model.Product;
import junit.framework.TestCase;

public class ViewTests extends TestCase {
	
	Product glass = new Product("glass", 5);
	Product fork = new Product("fork", 2);
	Product knife = new Product("knife", 3);
	public void testViewProduct(){
		ArrayList<Product> products = new ArrayList<Product>();
		Model model = new Model(products);
		model.getProducts().add(glass);
		model.getProducts().add(fork);
		model.getProducts().add(knife);
		View view = new View(model);
		assertEquals(view.viewProduct(1), fork);
	}
}
